libxl+xend: use correct paths for PV console when running bootloader
authorIan Campbell <ian.campbell@citrix.com>
Tue, 7 Sep 2010 17:50:55 +0000 (18:50 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 7 Sep 2010 17:50:55 +0000 (18:50 +0100)
Makes "{xl,xm} create -c GUEST" work again with pygrub in interactive
mode which was broken by 21994:2e08ec0028e4

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_bootloader.c
tools/python/xen/util/diagnose.py
tools/python/xen/xend/XendBootloader.py

index 13721f7fabae1e1760d7a90952b656430af9733e..d96db5b2e126ecc468f077c32b3d341deb8cc5d3 100644 (file)
@@ -383,7 +383,7 @@ int libxl_run_bootloader(libxl_ctx *ctx,
         goto out_close;
     }
 
-    dom_console_xs_path = libxl_sprintf(&gc, "%s/serial/0/tty", libxl_xs_get_dompath(&gc, domid));
+    dom_console_xs_path = libxl_sprintf(&gc, "%s/console/tty", libxl_xs_get_dompath(&gc, domid));
     libxl_xs_write(&gc, XBT_NULL, dom_console_xs_path, "%s", dom_console_slave_tty_path);
 
     pid = fork_exec_bootloader(&bootloader_fd, (char *)info->u.pv.bootloader, args);
index b857e2d7401443fb979bf584c5ef6e439d69bbdf..e31f396e730dfeaf408fdc7018ed1faa67db25ad 100644 (file)
@@ -77,7 +77,7 @@ def diagnose(dom):
 def diagnose_console():
     port    = xstransact.Read(dompath + '/console/port')
     ringref = xstransact.Read(dompath + '/console/ring-ref')
-    tty     = xstransact.Read(dompath + '/serial/0/tty')
+    tty     = xstransact.Read(dompath + '/console/tty')
 
     if not port:
         print "Console port is missing; Xend has failed."
index 0cef917358e21a47169c3b634b0b89ebf499529d..74c9a2ac196a8110a32d0331a91bb90dd9ac4822 100644 (file)
@@ -85,7 +85,7 @@ def bootloader(blexec, disk, dom, quiet = False, blargs = '', kernel = '',
     fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY)
 
     slavename = ptsname.ptsname(m1)
-    dom.storeDom("serial/0/tty", slavename)
+    dom.storeDom("console/tty", slavename)
 
     # Release the domain lock here, because we definitely don't want 
     # a stuck bootloader to deny service to other xend clients.